package com.myproject.shop.service.impl;


import com.myproject.shop.domain.Member;
import com.myproject.shop.mapper.MemberMapper;
import com.myproject.shop.service.IMemberService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service

    public class MemberServiceImpl implements IMemberService {

        @Resource
        private MemberMapper memberMapper;

        @Override
        public List<Member> selectAllMembers() {
            return memberMapper.selectAllMembers();
        }

        @Override
        public List<Member> selectMembersByParam(String memberName) {
            return memberMapper.selectMembersByParam(memberName);
        }

        @Override
        public Member selectMemberById(Integer mid) {
            return memberMapper.selectMemberById(mid);
        }

        @Override
        public int insertMember(Member member) {
            return memberMapper.insertMember(member);
        }

        @Override
        public int updateMember(Member member) {
            return memberMapper.updateMember(member);
        }

        @Override
        public int deleteMemberById(Integer mid) {
            return memberMapper.deleteMemberById(mid);
        }
    }

